Skip to content

Conversation

@abramclark
Copy link
Contributor

Old code constructed broken query params

@abramclark abramclark requested review from att14 and mwaldt April 9, 2018 20:30
for param in verify_strict:
url += "verify_strict[]={0}".format(param)
url += '?' + '&'.join(
['verify[]=' + param for param in verify] +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use .format instead of +.

@abramclark
Copy link
Contributor Author

@att14 how's this?


@classmethod
def create(cls, api_key=None, verify=None, verify_strict=None, **params):
def create(cls, api_key=None, verify=[], verify_strict=[], **params):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use mutable types as kwargs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this could be called repeatedly. Uhg I'm not a fan of that bit of Python behavior

@abramclark abramclark merged commit 3115008 into master Apr 16, 2018
@jontsai jontsai deleted the zip4-delivery-fix-abram branch July 20, 2021 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants